namespace Material.Mvc.Models
{
    /// <summary>
    /// 聊天视图模型，用于在视图和控制器之间传递聊天相关数据
    /// </summary>
    public class ChatViewModel
    {
        /// <summary>
        /// 用户输入的消息
        /// </summary>
        public string Message { get; set; }

        /// <summary>
        /// 智能客服的回复
        /// </summary>
        public string Response { get; set; }

        /// <summary>
        /// 聊天历史记录列表
        /// </summary>
        public List<ChatMessageModel> ChatHistory { get; set; }

        /// <summary>
    /// 初始化聊天视图模型
    /// </summary>
    public ChatViewModel()
    {
        ChatHistory = new List<ChatMessageModel>();
        Response = string.Empty;
        Message = string.Empty;
    }
    }

    /// <summary>
    /// 聊天消息模型，用于表示单条聊天消息
    /// </summary>
    public class ChatMessageModel
    {
        /// <summary>
        /// 消息发送者角色（user或assistant）
        /// </summary>
        public string Role { get; set; }

        /// <summary>
        /// 消息内容
        /// </summary>
        public string Content { get; set; }

        /// <summary>
        /// 消息发送时间
        /// </summary>
        public DateTime Timestamp { get; set; }

        /// <summary>
    /// 初始化聊天消息模型
    /// </summary>
    public ChatMessageModel()
    {
        Timestamp = DateTime.Now;
        Role = string.Empty;
        Content = string.Empty;
    }
    }
}